<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.SmsModule.bean.*,com.dati.bean.*,com.dianbo.bean.*" %>
<%
	List<DianboType> dianboTypeList = (ArrayList<DianboType>)session.getAttribute("dianboTypeList");
	List<DatiType> datiTypeList = (ArrayList<DatiType>)session.getAttribute("datiTypeList");
	String sendPhone = session.getAttribute("sendPhone").toString();
	
	String startTime = session.getAttribute("startTime").toString();
	String endTime = session.getAttribute("endTime").toString();
	String content = session.getAttribute("content").toString();
	String oldPhone = session.getAttribute("oldPhone").toString();
	
	String smsId = request.getParameter("smsId");
	String smsType = request.getParameter("smsType");
	String totalJifen = request.getParameter("totalJifen");
	System.out.println("smsType==="+smsType);
	
%>
<jsp:include page="../head.jsp"></jsp:include>

<body>
 
                <ul class="tabs-nav clearfix">
                    <li>短信分拣</li>
                </ul>
                <div class="tabs-panel">
                
                	<table width="100%" class="form">
                             
                              <%
                               if(smsType.equals("0")){
                            	   %>
                              <tr style="display:block" id="dianbo">
                                <td><table>
                                	<tr>
                                	 <th scope="row">手机号码 </th><td>
                               	        <input type="text" name="dianboPhone" id="dianboPhone" value="<%=sendPhone%>"  readonly="readonly"/>
                                	  </td></tr>
                                	  
                                	<tr>
                                	  <th scope="row">当前积分 </th><td>
                               	          &nbsp;&nbsp;&nbsp;<input type="text" name="" id="" value="<%=totalJifen %>" readonly="readonly"/><font color="red">分</font>
                                	  </td></tr>
                                	  
                                	  <tr><td colspan="2"><input type="radio" name="addJifen" id="addJifen" onclick="selectJifenType('0')" value="0" checked="checked"/>自动加分&nbsp;&nbsp;
                                	  <input type="radio" name="addJifen" id="addJifen"  onclick="selectJifenType('1')" value="1"/>手动加分</td></tr>
                                	<tr><th scope="row">类型</th><td>
                                	  <select id="dianboId" onChange="selectDianbo(dianboId.value)">
                                	  <option value="0">选择分拣类型</option>
                                	    <%
                                	 if(dianboTypeList!=null&&dianboTypeList.size()>0){
                                		 for(DianboType dianbo:dianboTypeList){
                                			%>
                                	    <option value="<%=dianbo.getTypeId() %>"><%=dianbo.getTypeName() %></option>
                                	    <%  
                                		 }
                                	 }
                                	%>
                              	    </select> 
                              	      <input type="hidden" name="dianbo_Type" id="dianbo_Type" value="0"/>
                              	    </td>
                                	</tr>
                                	<tr style="display:block" id="0"><th scope="row">自动加分</th><td>  <input type="text" readonly="readonly" name="dianboValue" id="dianboValue" value=""/></td></td></tr>
                                	<tr style="display:none" id="1"><th scope="row">手动加分</th><td>  <input type="text" name="newDianboValue" id="newDianboValue" value=""/></td></td></tr>
                                </table></td>
                              </tr>
                            	   <%
                               }else if(smsType.equals("1")){
                            	   %>
                            	   <tr style="display:block" id="dati">
                               <td><table><tr>
                                 <th scope="row">手机号码  </th><td>
                                   <input type="text" name="datiPhone" id="datiPhone" value="<%=sendPhone%>"  readonly="readonly"/>
                                 </td></tr>
                                 <tr>
                                	  <th scope="row">当前积分 </th><td>
                               	         &nbsp;&nbsp;&nbsp;<input type="text" name="" id="" value="<%=totalJifen %>" readonly="readonly"/><font color="red">分</font>
                                	  </td></tr>
                                	  <tr><td colspan="2"><input type="radio" name="addJifen" id="addJifen" onclick="selectJifenType('0')" value="0" checked="checked"/>自动加分&nbsp;&nbsp;
                                	  <input type="radio" name="addJifen" id="addJifen"  onclick="selectJifenType('1')" value="1"/>手动加分</td></tr>
                                <tr><th scope="row">类型</th><td>
                                  <select id="datiId" onChange="selectDati(datiId.value)">
                                  <option value="0">请选择类型</option>
                                    <%
                                 if(datiTypeList!=null&&datiTypeList.size()>0){
                                	 for(DatiType datiType:datiTypeList){
                                		 %>
                                    <option value="<%=datiType.getAnswerTypeId() %>"><%=datiType.getTypeName() %></option>
                                    <%
                                	 }
                                 }
                                %>
                                  </select>
                                  <input type="hidden" name="dati_Type" id="dati_Type" value="0">
                                </td></tr>
                                <tr style="display:none" id="xilie"><th scope="row">系列</th><td><div id="xilieList"></div>
                                </td></tr>
                                <tr style="display:block" id="0"><th scope="row">自动加分</th><td>  <input type="text" readonly="readonly" name="datiValue" id="datiValue" value=""/></td></td></tr>
                                <tr style="display:none" id="1"><th scope="row">手动加分</th><td>  <input type="text" name="newDatiValue" id="newDatiValue" value=""/></td></td></tr>
                               </table></td>
                              </tr>
                            	   <%
                            	   
                               }
                              %>
                              
                              <tr><td class="tl"><div align="center">
                                <input type="button" value="确定" onClick="fenjiansubmit('../TbSmsServlet?method=fenjianSubmit&smsId=<%=smsId %>&startTime=<%=startTime %>&endTime=<%=endTime %>&content=<%=content %>&phone=<%=sendPhone %>&oldPhone=<%=oldPhone %>');"/>
                                &nbsp;&nbsp;
                                <input type="button" value="关闭" onClick="form1.msg.close();"/>
                                <input type="hidden" name="dianboOrDati" id="dianboOrDati" value="<%=smsType %>"/>
                              </div></td>
                              </tr>
                    </table>
                </div>                
        </body>
</html>
